<template>
  <wd-overlay :show="show" @click="closeMode()" :z-index="1000">
    <image
      class="fengx"
      :style="{
        top: (props.isCustomNav ? bottom + 10 : 0) + 'px',
      }"
      src="./images/guide-miniprogram.png"
      mode="widthFix"
    />
  </wd-overlay>
</template>

<script lang="ts" setup>
const props = defineProps(['isCustomNav'])
const emits = defineEmits(['closeMode'])
const show = ref(true)

let bottom = 0
// #ifdef MP
bottom = wx.getMenuButtonBoundingClientRect().bottom
// #endif

function closeMode() {
  emits('closeMode')
}
</script>

<style lang="scss" scoped>
.fengx {
  position: absolute;
  top: 0;
  right: 32rpx;
  width: 460rpx;
}
</style>
